<template>
  <div class="container">
    <div class="article-message">
      <div class="message-head">
        <div class="tag-container">
          <div class="article-tag" v-for="(item, index) in Message.tag" :key="index">
            <Tag :tag="item.tag"></Tag>
          </div>
        </div>
        <div>
          <TitleBar icon="fa fa-bookmark" class="article-kind" :title="Message.title"></TitleBar>
        </div>
      </div>
      <el-row :gutter="10">
        <el-col :lg="6" :sm="12" :xs="12" :md="12" :offset="0">
          <TitleBar title="发布日期：" icon="fa fa-calendar">
            <template #default>
              <span>{{ Message.create_time }}</span>
            </template>
          </TitleBar>
        </el-col>
        <el-col :lg="6" :sm="12" :xs="12" :md="12" :offset="0">
          <TitleBar title="更新日期：" icon="fa fa-calendar-o">
            <template #default>
              <span>{{ Message.update_time }}</span>
            </template>
          </TitleBar>
        </el-col>
        <el-col :lg="6" :sm="12" :xs="12" :md="12" :offset="0">
          <TitleBar title="文章字数：" icon="fa fa-file-word-o">
            <template #default>
              <span></span>
            </template>
          </TitleBar>
        </el-col>
        <el-col :lg="6" :sm="12" :xs="12" :md="12" :offset="0">
          <TitleBar title="阅读次数：" icon="fa fa-minus-square-o">
            <template #default>
              <span>{{ Message.view_num }}</span>
            </template>
          </TitleBar>
        </el-col>
      </el-row>
    </div>
    <div class="article-introduce">
      <p>{{ Message.introduction }}</p>
    </div>
  </div>
</template>

<script>
import TitleBar from "@/components/common/TitleBar.vue";
import Tag from "@/components/Article/Tag.vue";
export default {
  props: {
    Message: {
      require: true,
      type: Object,
    },
  },
  components: {
    TitleBar,
    Tag,
  },
  data() {
    return {};
  },
};
</script>

<style scoped>
.article-introduce {
  color: #34495e;
  border-top: 1px solid #ccc;
}
.article-introduce p {
  width: 80%;
  text-align: center;
  margin: 1.5rem auto;
}
.article-message {
  width: 80%;
  margin: 1rem auto;
  text-align: center;
  font-size: 0.8rem;
}
.message-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}
.tag-container {
  display: flex;
  align-items: center;
}

.article-kind {
  color: #43ceff;
  font-size: 1rem;
}
.tag-container {
  display: flex;
}
</style>
